package com.huike.business.service.impl;


import com.huike.business.domain.TbBusinessTrackRecord;
import com.huike.business.domain.vo.BusinessTrackVo;
import com.huike.business.mapper.TbBusinessMapper;
import com.huike.business.mapper.TbBusinessTrackRecordMapper;
import com.huike.business.service.ITbBusinessTrackRecordService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 商机跟进记录Service业务层处理
 * 
 * @author wgl
 * @date 2021-04-28
 */
@Service
@RequiredArgsConstructor
public class TbBusinessTrackRecordServiceImpl implements ITbBusinessTrackRecordService {

private TbBusinessMapper tbBusinessMapper;
private TbBusinessTrackRecordMapper tbBusinessTrackRecordMapper;


    @Override
    public int insertBusinessTrack(BusinessTrackVo businessTrackVo) {

        tbBusinessMapper.updateTbBusinessTrack(businessTrackVo);
        tbBusinessMapper.insertTbBusinessTrack(businessTrackVo);
        tbBusinessTrackRecordMapper.insertTbBusinessTrack(businessTrackVo);
        return 1;
    }


    @Override
    public List<TbBusinessTrackRecord> list(Long id) {


        return tbBusinessTrackRecordMapper.list(id);
    }
}
